[6.x] Remove web awesome dependency#19244
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vue-tsc pre-commit check skipped: it fails on pre-existing missing generated artifacts (dist/wayfinder) in this worktree, unrelated to this rename. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The open attribute is still supported; the open *property* is gone because Lion's overlay system defines open() as a method. Use the opened property at runtime. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📚 Storybook previews@craftcms/cp — open Storybook Changed components:
resources/js — open Storybook No changed components detected in this Storybook. |
The old tooltip will be availble at `craft-legacy-tooltip`
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the Web Awesome dependency from the @craftcms/cp component package and updates the CMS Control Panel bootstrapping to use Lion-based overlays and a URL-based icon resolver, so CP UI no longer depends on both Lion and Web Awesome.
Changes:
- Replaced Web Awesome-based overlay components (tooltip/popover/dialog) with Lion-based implementations and introduced
craft-*overlay lifecycle events. - Implemented a fetch-based icon resolver with configurable base URL, and wired CMS CP bootstrap to configure it (plus legacy name normalization).
- Removed Web Awesome-specific CSS tokens, build externals, and package dependencies; dropped
CraftDrawer/CraftDropdownexports.
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Cp/Cp.php | Adds iconBaseUrl to CP bootstrap data for runtime icon URL configuration. |
| resources/js/modules/markdown-field/behaviors/link-popover.ts | Updates listener from wa-after-hide to craft-after-hide for the new overlay lifecycle events. |
| resources/js/bootstrap/icons.ts | Adds CP icon resolver configuration + legacy name normalization. |
| resources/js/bootstrap/cp.ts | Initializes the icon resolver using iconBaseUrl from CP config. |
| packages/craftcms-cp/src/utilities/overlay-events.ts | Adds Lion opened-changed → craft-* lifecycle event bridge. |
| packages/craftcms-cp/src/utilities/overlay-events.test.ts | Adds tests for overlay lifecycle event bridging behavior. |
| packages/craftcms-cp/src/utilities/icons.ts | Replaces Web Awesome icon library registration with a Lion icon resolver + fetch/caching implementation. |
| packages/craftcms-cp/src/utilities/icons.test.ts | Updates/extends icon URL tests (including custom base URL coverage). |
| packages/craftcms-cp/src/styles/shared/tokens.css | Removes Web Awesome design token overrides. |
| packages/craftcms-cp/src/index.ts | Removes WA bootstrap and exports icon utilities; drops drawer/dropdown exports. |
| packages/craftcms-cp/src/components/tooltip/tooltip.ts | Reimplements tooltip on Lion tooltip/overlay + emits craft-* lifecycle events. |
| packages/craftcms-cp/src/components/tooltip/tooltip.test.ts | Adds tooltip behavior/event tests for the Lion-based implementation. |
| packages/craftcms-cp/src/components/tooltip/tooltip.stories.ts | Removes obsolete WA import comment. |
| packages/craftcms-cp/src/components/tooltip/Tooltip.mdx | Updates documentation to describe the new Lion-based tooltip API/events. |
| packages/craftcms-cp/src/components/popover/popover.ts | Reimplements popover via Lion overlays + emits craft-* lifecycle events. |
| packages/craftcms-cp/src/components/popover/popover.test.ts | Adds popover behavior/event tests for the Lion-based implementation. |
| packages/craftcms-cp/src/components/info-icon/info-icon.ts | Updates event listeners from wa-* to craft-* overlay lifecycle events. |
| packages/craftcms-cp/src/components/info-icon/info-icon.stories.ts | Switches stories to Lit html templates (string → TemplateResult). |
| packages/craftcms-cp/src/components/icon/icon.ts | Reimplements <craft-icon> as a LitElement that resolves/fetches SVGs via the new resolver. |
| packages/craftcms-cp/src/components/icon/icon.test.ts | Adds tests for fetch behavior, caching, accessibility attributes, and slotted SVG precedence. |
| packages/craftcms-cp/src/components/dropdown/dropdown.ts | Removes Web Awesome dropdown wrapper component. |
| packages/craftcms-cp/src/components/dropdown/dropdown.styles.ts | Removes dropdown styles file tied to the removed WA dropdown. |
| packages/craftcms-cp/src/components/dropdown/dropdown.stories.ts | Removes dropdown Storybook stories. |
| packages/craftcms-cp/src/components/drawer/drawer.ts | Removes Web Awesome drawer wrapper component. |
| packages/craftcms-cp/src/components/drawer/drawer.stories.ts | Removes drawer Storybook stories. |
| packages/craftcms-cp/src/components/dialog/dialog.ts | Reimplements dialog on Lion dialog/overlay and custom light-DOM structure/styling. |
| packages/craftcms-cp/src/components/dialog/dialog.test.ts | Adds tests for dialog structure, open/attribute syncing, close affordances, and events. |
| packages/craftcms-cp/src/components/dialog/dialog.stories.ts | Updates story usage from open to opened to match Lion dialog API. |
| packages/craftcms-cp/src/components/breadcrumb-item/breadcrumb-item.ts | Reimplements breadcrumb item without WA, with link rendering and separator slot. |
| packages/craftcms-cp/src/components/breadcrumb-item/breadcrumb-item.test.ts | Adds tests for breadcrumb item link/span rendering and separator slot behavior. |
| packages/craftcms-cp/scripts/generate-vue-wrappers.js | Removes drawer/dropdown from generated Vue wrapper list. |
| packages/craftcms-cp/scripts/build.js | Removes @awesome.me/webawesome from build externals. |
| packages/craftcms-cp/package.json | Removes Web Awesome peer/dev dependency entries. |
| packages/craftcms-cp/.storybook/preview.ts | Switches Storybook icon resolver wiring to the new icon utility functions. |
| package-lock.json | Removes Web Awesome dependency entries. |
Comments suppressed due to low confidence (1)
packages/craftcms-cp/src/utilities/icons.ts:89
getIconUrl()strips the.svgsuffix before parsing a variant-prefixed name. For inputs likeregular/x.svg, the.svgremoval happens on the full string, but after the/splitresolvedNamebecomesx.svg, producing a URL ending inx.svg.svg. Strip the suffix after resolving the variant/name parts (or strip it from the post-split name).
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a few components in the
craftcms/cppackage that rely on Web Awesome. This removes that requirement so we aren't depending on both Lion and WA